package com.example.mallproduct.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.common.utils.PageUtils;
import com.example.mallproduct.controller.vo.SkuInfoVO;
import com.example.mallproduct.controller.vo.SpuItemVO;
import com.example.mallproduct.entity.SkuInfoEntity;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * sku信息
 *
 * @author charlie
 * @email @gmail.com
 * @date 2023-11-26 14:55:58
 */
public interface SkuInfoService extends IService<SkuInfoEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 发布商品保存数据
     * @param skuInfoVO
     */
    void saveDetails(SkuInfoVO skuInfoVO);

    PageUtils queryPageByCondition(Map<String, Object> params);

    /**
     * 根据spuId查询sku信息
     * @param spuId
     * @return
     */
    List<SkuInfoEntity> skuInfoBySpuId(Long spuId);

    /**
     * 查询商品详细
     * @param skuId
     * @return
     */
    SpuItemVO skuDetails(Long skuId) throws ExecutionException, InterruptedException;

    List<String> getSaleAttrs(Long skuId);
}

